/**
import { Comments } from '@/components/Comments';
 * Created by Administrator on 2018/11/17.
 */
const Cookie = require("../models/cookies");
/**
 * 退出登录
 */

module.exports = function (req, response) {
//   console.log('req.cookies:', req.cookies);

  const whereStr = req.cookie ? {
    username: req.cookies.username
  } : {};
  Cookie.remove(whereStr, function (err, res) {
    if (err) {
      console.log("Error:" + err);
    } else {
      response.json({
          status: 0,
          data: {
              msg: '退出成功'
          }
      })
    }
  })

}
